// swiper.scss
$transition-duration: 0.6s;

.swiper-container {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);

  .slides-wrapper {
    display: flex;
    height: 100%;
    transition: transform $transition-duration ease-in-out;
  }

  .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: opacity $transition-duration ease-in-out;
    
    h2 {
      text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
  }

  .nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    
    &:hover {
      background: rgba(255,255,255,0.4);
      transform: translateY(-50%) scale(1.1);
    }

    &.prev { right: 4rem; }
    &.next { right: 1rem; }
  }

  .pagination {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;

    .dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: rgba(255,255,255,0.5);
      cursor: pointer;
      transition: all 0.3s ease;

      &.active {
        background: white;
        transform: scale(1.2);
      }

      &:hover {
        transform: scale(1.2);
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .swiper-container {
    height: 300px;
    
    .nav-button {
      padding: 0.8rem;
    }
    
    .slide h2 {
      font-size: 1.5rem;
    }
  }
}